﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace NRemedy.CodeGenerator.WinForm
{
    public class ARThread
    {
        protected virtual IARServer _server { get; set; }
        protected virtual Thread _thread { get; set; }

        protected virtual ARLogInRequestContext _context { get; set; }

        public virtual ThreadState ThreadState
        {
            get { return this._thread.ThreadState; }
        }

        public ARThread()
        {
            _context = new ARLogInRequestContext
            {
                UserName = "parkerz.admin",
                Server = "vs31srm01",
                Password = "admin",
                Authentication = string.Empty
            };

        }

        public virtual bool IsRunning()
        {
            if (this._thread == null) return false;
            if (this._thread.ThreadState == System.Threading.ThreadState.Running) return true;
            return false;
        }
    }
}
